<link rel="stylesheet" href="../addons/jy_creditshop/resource/css/common.css?v=1" />
<link rel="stylesheet" href="../addons/jy_creditshop/resource/css/common-new.css?v=1" />
<style type="text/css">
    .fui-navbar ~ .fui-content, .fui-content.navbar{padding:0;}
</style>
<div class='fui-page  fui-page-current creditshop-index-page'>
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:auto">
				<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.setting.hdps">
					<a href="javascript:;" ng-click="access_json(item.url)">
						<img ng-src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
					<div class="fui-swipe-bullet" ng-repeat="item in pagedata.setting.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<div class='fui-content creditshop-index-page'>
        <div class="menu" style="overflow:hidden">
            <a class="item" href="javascript:void(0);">
                <span class="text"><i class="icon jinyunicon icon-jifen"></i> 积分{{pagedata.member.credit1 || '0'}}</span>
            </a>
            <a class="item" href="javascript:;" ng-click="access_json('jy_creditshop/creditlog//')">
                <span class="text"><i class="icon jinyunicon icon-dingdan"></i> 参与记录</span>
            </a>
        </div>
		<div ng-include="sys_html('shop/_notice','','','jy_weishop')"></div>
        <div ng-if="pagedata.category.length >0 && pagedata.category" class="fui-icon-group noborder circle " style="margin-top: 0.5rem">
            <div ng-repeat="cate in pagedata.category" class="fui-icon-col">
                <a href="javascript:;" ng-click="access_json('jy_creditshop/goods/main/cateid='+cate.id)" class="external">
                    <div class="icon"><img ng-src="{{tomedia(cate.thumb)}}"></div>
                    <div class="text">{{cate.name}}</div>
                </a>
            </div>
        </div>
		<div style="padding:0 0.4rem">
        <!--特色抽奖区-->
        <div ng-if="pagedata.cjlist.length >0 && pagedata.cjlist" class="fui-cell-group fui-cell-click">
            <a class="fui-cell">
                <div class="fui-cell-icon"><i class="icon jinyunicon icon-gifts"></i></div>
                <div class="fui-cell-text"><p>抽奖专区</p></div>
            </a>
        </div>
        <div ng-if="pagedata.cjlist.length >0 && pagedata.cjlist" class="fui-goods-group white block">
            <a ng-repeat="item in pagedata.cjlist" class="fui-goods-item external" href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail/main/id='+item.id)" data-nocache="true">
                <div class="image" data-lazyloaded="true" style="background-image: url('{{tomedia(item.thumb)}}');"></div>
                <div class="detail">
                    <div class="name">
                        <span ng-if="item.goodstype==0" class="fui-subtext">商品</span>
                        <span ng-if="item.goodstype==1" class="fui-subtext">优惠券</span>
                        <span ng-if="item.goodstype==2" class="fui-subtext">余额</span>
                        <span ng-if="item.goodstype==3" class="fui-subtext">红包</span>                      
                        {{item.title}}
                    </div>
                    <div class="price" style="display: block;">
                        <span style="font-size: 0.5rem">
                            <span style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">{{item.credit}}</span>
                            <span style="color:#999;">{{item.credit_title ||'积分'}}</span>
                            
                              <span ng-if="item.money>0" style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">+ &yen;{{item.money}}</span>
                           
                        </span>
                        <span class="fui-text text-danger2" style="float:right;">抽奖</span>
                    </div>
                </div>
            </a>
        </div>
        <div ng-if="pagedata.list.length >0 && pagedata.list" class="fui-cell-group fui-cell-click">
            <a class="fui-cell">
                <div class="fui-cell-icon"><i class="icon jinyunicon icon-gifts"></i></div>
                <div class="fui-cell-text"><p>实物兑换</p></div>
            </a>
        </div>
        <div ng-if="pagedata.list.length >0 && pagedata.list" class="fui-goods-group white block">
            <a ng-repeat="item in pagedata.list" class="fui-goods-item external" href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail/main/id='+item.id)" data-nocache="true">
                <div class="image" data-lazyloaded="true" style="background-image: url('{{tomedia(item.thumb)}}');"></div>
                <div class="detail">
                    <div class="name">
                        {{item.title}}
                    </div>
                    <div class="price" style="display: block;">
                        <span style="font-size: 0.5rem">
                            <span style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">{{item.credit}}</span>
                            <span style="color:#999;">{{item.credit_title ||'积分'}}</span>
                           <span ng-if="item.money>0" style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">+ &yen;{{item.money}}</span>
                        </span>
                        <span class="fui-text text-danger2" style="float:right;">兑换</span>
                    </div>
                </div>
            </a>
        </div>
       

        <!--红包兑换区-->
        <div ng-if="pagedata.list3.length >0 && pagedata.list3" class="fui-cell-group fui-cell-click">
            <a class="fui-cell">
                <div class="fui-cell-icon"><i class="icon jinyunicon icon-gifts"></i></div>
                <div class="fui-cell-text"><p>红包兑换区</p></div>
            </a>
        </div>
        <div ng-if="pagedata.list3.length >0 && pagedata.list3" class="fui-goods-group white block">
            <a ng-repeat="item in pagedata.list3" class="fui-goods-item external"  href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail/main/id='+item.id)" data-nocache="true">
                <div class="image" data-lazyloaded="true" style="background-image: url('{{tomedia(item.thumb)}}');"></div>
                <div class="detail">
                    <div class="name">{{item.title}}</div>
                    <div class="price" style="display: block;">
                        <span style="font-size: 0.5rem">
                            <span style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">{{item.credit}}</span>
                            <span style="color:#999;">{{item.credit_title ||'积分'}}</span>
                            <span ng-if="item.money>0" style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">+ &yen;{{item.money}}</span>
                        </span>
                        <span class="fui-text text-danger2" style="float:right;">兑换</span>
                    </div>
                </div>
            </a>
         
        </div>
        
        <div ng-if="pagedata.list1.length >0 && pagedata.list1" class="fui-cell-group fui-cell-click">
            <a class="fui-cell">
                <div class="fui-cell-icon"><i class="icon jinyunicon icon-gifts"></i></div>
                <div class="fui-cell-text"><p>兑换劵</p></div>
            </a>
        </div>
        <div ng-if="pagedata.list1.length >0 && pagedata.list1" class="fui-goods-group">
            <a ng-repeat="item in pagedata.list1" class="fui-goods-item external" href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail/main/id='+item.id)" data-nocache="true">
                <div class="image" data-lazyloaded="true" style="background-image: url('{{tomedia(item.thumb)}}');"></div>
                <div class="detail">
                    <div class="name">{{item.title}}</div>
                    <div class="price" style="display: block;">
                        <span style="font-size: 0.5rem">
                            <span style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">{{item.credit}}</span>
                            <span style="color:#999;">{{item.credit_title ||'积分'}}</span>
                           <span ng-if="item.money>0" style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">+ &yen;{{item.money}}</span>
                        </span>
                        <span class="fui-text text-danger2" style="float:right;">兑换</span>
                    </div>
                </div>
            </a>
        </div>
       
        <!--余额兑换区-->
        <div ng-if="pagedata.list2.length >0 && pagedata.list2" class="fui-cell-group fui-cell-click">
            <a class="fui-cell">
                <div class="fui-cell-icon"><i class="icon jinyunicon icon-gifts"></i></div>
                <div class="fui-cell-text"><p>余额兑换区</p></div>
            </a>
        </div>
        <div ng-if="pagedata.list2.length >0 && pagedata.list2" class="fui-goods-group white block">
            <a ng-repeat="item in pagedata.list2" class="fui-goods-item external" href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail/main/id='+item.id)" data-nocache="true">
                <div class="image" data-lazyloaded="true" style="background-image: url('{{tomedia(item.thumb)}}');"></div>
                <div class="detail">
                    <div class="name">{{item.title}}</div>
                    <div class="price" style="display: block;">
                        <span style="font-size: 0.5rem;">
                            <span style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">{{item.credit}}</span>
                            <span style="color:#999;">{{item.credit_title ||'积分'}}</span>
                             <span ng-if="item.money>0" style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">+ &yen;{{item.money}}</span>
                        </span>
                        <span class="fui-text text-danger2" style="float:right;">兑换</span>
                    </div>
                </div>
            </a>
        </div>
		<!--币兑换区-->
        <div ng-if="pagedata.list4.length >0 && pagedata.list4" class="fui-cell-group fui-cell-click">
            <a class="fui-cell">
                <div class="fui-cell-icon"><i class="icon jinyunicon icon-gifts"></i></div>
                <div class="fui-cell-text"><p>币兑换区</p></div>
            </a>
        </div>
        <div ng-if="pagedata.list4.length >0 && pagedata.list4"  class="fui-goods-group white block">
            <a ng-repeat="item in pagedata.list4" class="fui-goods-item external" href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail/main/id='+item.id)" data-nocache="true">
                <div class="image" data-lazyloaded="true" style="background-image: url('{{tomedia(item.thumb)}}');"></div>
                <div class="detail">
                    <div class="name">{{item.title}}</div>
                    <div class="price" style="display: block;">
                        <span style="font-size: 0.5rem;">
                            <span style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">{{item.credit}}</span>
                            <span style="color:#999;">{{item.credit_title ||'积分'}}</span>
                             <span ng-if="item.money>0" style="font-size: 0.8rem;font-weight: bold;padding-right: 0.1rem;">+ &yen;{{item.money}}</span>
                        </span>
                        <span class="fui-text text-danger2" style="float:right;">兑换</span>
                    </div>
                </div>
            </a>
        </div>
		</div>
    </div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>